package com.woniuxy.param.UserRelatedParam;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 周川雄
 * @date 2021/12/31 21:52
 */
@Data
public class UpdateUserParam {
    @NotNull(message = "用户不能为空")
    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @NotBlank(message = "账号不能为空")
    @ApiModelProperty(value = "账号")
    private String userAccount;

    @NotBlank
    /**
     * 验证手机号，空和正确的手机号都能验证通过<br/>
     * 正确的手机号由11位数字组成，第一位为1
     * 第二位为 3、4、5、7、8
     *
     */
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}", message = "手机号格式错误！")
    @NotBlank(message = "手机号不能为空！")
    @ApiModelProperty("手机号")
    private String userPhone;

    @NotBlank(message = "姓名不能为空！")
    @ApiModelProperty(value = "姓名")
    private String userName;

    @ApiModelProperty(value = "创建时间")
    private String userCreationtime;

    @ApiModelProperty(value = "头像路径")
    private String userImage;

    @ApiModelProperty(value = "最后登录时间")
    private String userLastime;

    @ApiModelProperty(value = "默认0 正常 1禁用")
    private Integer userStatus;

}
